package com.eddie.composite;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author Eddie
 * @date 2022/08/01 11:24
 **/
@AllArgsConstructor
@Data
public abstract class OrganizationComponent {

    private String name;// 名字
    private String des;//说明

    protected void add(OrganizationComponent component) {
        //默认实现
        throw new UnsupportedOperationException();
    }


    protected void remove(OrganizationComponent component) {
        //默认实现
        throw new UnsupportedOperationException();
    }

    //方法print 这个方法下面的子类都需要实现
    protected abstract void print();

}
